﻿package Message.Game
{
    import Framework.MQ.*;
    import Framework.Serialize.*;

    public class SRole extends IMessageBase
    {
        public var level:int;
        public var experience:Number;
        public var career:int;
        public var careerSecond:int;
        public var life:int;
        public var mana:int;
        public var anger:int;
        public var stamina:int;
        public const _type:int = 15002;
        public static var _regist:SRole = new SRole(true);

        public function SRole(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            return;
        }// end function

        override public function getType() : int
        {
            return this._type;
        }// end function

        override public function clone() : IMessageBase
        {
            return new SRole();
        }// end function

        override public function __write(param1:SerializeStream) : void
        {
            param1.writeInt(this.level);
            param1.writeLong(this.experience);
            param1.writeInt(this.career);
            param1.writeInt(this.careerSecond);
            param1.writeInt(this.life);
            param1.writeInt(this.mana);
            param1.writeInt(this.anger);
            param1.writeInt(this.stamina);
            return;
        }// end function

        override public function __read(param1:SerializeStream) : void
        {
            this.level = param1.readInt();
            this.experience = param1.readLong();
            this.career = param1.readInt();
            this.careerSecond = param1.readInt();
            this.life = param1.readInt();
            this.mana = param1.readInt();
            this.anger = param1.readInt();
            this.stamina = param1.readInt();
            return;
        }// end function

    }
}
